package proj.common;

import java.io.Serializable;
import java.util.*;

//请求
public class Request implements Serializable {
	private String action;// 干嘛
	/*
	 * private String user, pass; private String novelName, author, desc;
	 * private String neirong;
	 */
	private Map<String, Object> params = new HashMap<>();

	public Request(String a) {
		this.action = a;
	}

	public Request() {
	}

	// 放参数
	public void put(String key, Object v) {
		params.put(key, v);
	}

	// 取参数
	public Object get(String key) {
		return params.get(key);
	}

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	@Override
	public String toString() {
		return "请求 [action=" + action + ", params=" + params + "]";
	}
}
